import 'package:flutter/material.dart';

///**
///* Description: 环形圆盘model
///  e.g. :AnnularDiscChartModel( title: "购买", color: Color(0xFFF7A046), percentage: 0.9),
///*/
class AnnularDiscChartModel {
  ///标题
  String title;

  ///颜色
  Color color;

  ///占比(0-1.0) 当为一的时候图形为圆环，具体占比请在外部算好再传入
  double percentage;

  AnnularDiscChartModel(
      {this.title, this.color = Colors.white, this.percentage = 0.0}) {
    if (this.percentage != null) {
      if (this.percentage > 1.0) {
        this.percentage = 1.0;
      }
      if (this.percentage < 0.0) {
        this.percentage = 0.0;
      }
    }
  }
}